package com.portal.cwegportal.mapper;

import com.portal.cwegportal.model.UserImPmAccount;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

@org.apache.ibatis.annotations.Mapper
@Repository
public interface UserImPmAccountMapper  extends Mapper<UserImPmAccount> {
    /**
     *  创建人:王增立
     *  备注: 删除旧密码
     *  时间: 2019/4/26 15:00
     *  参数:
     */
    @Select("update user_im_pm_account set is_deleted=1,gmt_modified=NOW() where creator_code=#{userCode} and type_key=#{typeKey} and is_deleted=0")
    void deleteByUserCode(String userCode, String typeKey);
    /**
     *  创建人:王增立
     *  备注: 查询用户密码
     *  时间: 2019/4/26 15:00
     *  参数:
     */
    @Select("select * from user_im_pm_account where creator_code=#{userCode} and type_key=#{typeKey} and is_deleted=0")
    UserImPmAccount selectByUserCode(String userCode, String typeKey);
}
